/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.proyectoMaccSelvaCentral.util;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
import java.io.IOException;
import java.io.Reader;

public class IbatisCongfig {

    private SqlMapClient sqlMap;
    private static final String resource = "com/proyectoMaccSelvaCentral/ibatis/SqlMapConfig.xml";

    public IbatisCongfig() throws IOException {
        Reader reader = Resources.getResourceAsReader(resource);
        sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
    }

    public String getResource() {
        return resource;
    }
   
    public SqlMapClient getSqlMap() {
        return sqlMap;
    }

    public void setSqlMap(SqlMapClient sqlMap) {
        this.sqlMap = sqlMap;
    }


}
